From d81784d12b8f2140576b5fc270c8426815b470dc Mon Sep 17 00:00:00 2001 From: robertlipe Date: Tue, 13 May 2014 04:45:57 +0000 Subject: [PATCH] Remove (most of) the -c handling from the GUI. This should help the problem that Peter Shepheard stumbled into. --- gpsbabel/gui/advdlg.cc | 4 ---- gpsbabel/gui/advdlg.h | 2 -- gpsbabel/gui/mainwindow.cc | 14 +------------- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/gpsbabel/gui/advdlg.cc b/gpsbabel/gui/advdlg.cc index 3bb1d9366..cf32bc580 100644 --- a/gpsbabel/gui/advdlg.cc +++ b/gpsbabel/gui/advdlg.cc @@ -28,18 +28,15 @@ //------------------------------------------------------------------------ AdvDlg::AdvDlg(QWidget* parent, bool &synthShortNames, - bool &enableCharSetXform, bool &previewGmap, int &debugLevel): QDialog(parent), synthShortNames_(synthShortNames), - enableCharSetXform_(enableCharSetXform), previewGmap_(previewGmap), debugLevel_(debugLevel) { ui_.setupUi(this); ui_.synthShortNames->setChecked(synthShortNames); - ui_.enableCharSetXform->setChecked(enableCharSetXform); ui_.previewGmap->setChecked(previewGmap); ui_.debugCombo->setCurrentIndex(debugLevel+1); ui_.buttonBox->button(QDialogButtonBox::Ok)->setIcon(QIcon(":images/ok")); @@ -51,7 +48,6 @@ AdvDlg::AdvDlg(QWidget* parent, void AdvDlg::acceptClicked() { synthShortNames_ = ui_.synthShortNames->isChecked(); - enableCharSetXform_ = ui_.enableCharSetXform->isChecked(); previewGmap_ = ui_.previewGmap->isChecked(); debugLevel_ = ui_.debugCombo->currentIndex()-1; accept(); diff --git a/gpsbabel/gui/advdlg.h b/gpsbabel/gui/advdlg.h index 1f4ce4873..0cec3d216 100644 --- a/gpsbabel/gui/advdlg.h +++ b/gpsbabel/gui/advdlg.h @@ -30,7 +30,6 @@ class AdvDlg: public QDialog { public: AdvDlg(QWidget* parent, bool &synthShortNames_, - bool &enableCharSetXform_, bool &previewGmap_, int &debugLevel_); QPushButton* formatButton() { return ui_.formatButton; }; @@ -38,7 +37,6 @@ public: private: Ui_AdvUi ui_; bool &synthShortNames_; - bool &enableCharSetXform_; bool &previewGmap_; int &debugLevel_; diff --git a/gpsbabel/gui/mainwindow.cc b/gpsbabel/gui/mainwindow.cc index b21e69e17..1e4423526 100644 --- a/gpsbabel/gui/mainwindow.cc +++ b/gpsbabel/gui/mainwindow.cc @@ -406,10 +406,6 @@ void MainWindow::loadCharSetCombos() //------------------------------------------------------------------------ void MainWindow::checkCharSetCombos() { - ui_.inputCharSetCombo->setEnabled(babelData_.enableCharSetXform_); - ui_.outputCharSetCombo->setEnabled(babelData_.enableCharSetXform_); - ui_.inputCharSetCombo->setVisible(babelData_.enableCharSetXform_); - ui_.outputCharSetCombo->setVisible(babelData_.enableCharSetXform_); } //------------------------------------------------------------------------ void MainWindow::inputFileOptBtnClicked() @@ -967,10 +963,6 @@ void MainWindow::applyActionX() if (babelData_.debugLevel_ >=0) args << QString("-D%1").arg(babelData_.debugLevel_); if (babelData_.synthShortNames_) args << "-s"; - // Input char set if specified - if (babelData_.enableCharSetXform_ && babelData_.inputCharSet_ != QString()) - args << "-c" << babelData_.inputCharSet_; - Format ifmt = formatList_[currentComboFormatIndex(ui_.inputFormatCombo)]; Format ofmt = formatList_[currentComboFormatIndex(ui_.outputFormatCombo)]; @@ -1005,10 +997,6 @@ void MainWindow::applyActionX() // --- Filters! args << filterData_.getAllFilterStrings(); - // Output char set if specified - if (babelData_.enableCharSetXform_ && babelData_.outputCharSet_ != QString()) - args << "-c" << babelData_.outputCharSet_; - // Output type, with options if (babelData_.outputType_ != BabelData::noType_) { bool outIsFile = (babelData_.outputType_ == BabelData::fileType_); @@ -1195,7 +1183,7 @@ void MainWindow::resetFormatDefaults() void MainWindow::moreOptionButtonClicked() { AdvDlg advDlg(0, babelData_.synthShortNames_, - babelData_.enableCharSetXform_, babelData_.previewGmap_, babelData_.debugLevel_); + babelData_.previewGmap_, babelData_.debugLevel_); connect(advDlg.formatButton(), SIGNAL(clicked()), this, SLOT(resetFormatDefaults())); advDlg.exec(); -- 2.30.2